<style type="text/css">
.buyPacketBlock{
	max-width: 400px;
	padding: 0px 29px 0px 29px;
	margin: 0 auto 20px;
	background-color: #FFF;
	border: 1px solid #E5E5E5;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
	-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .14);
	-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .14);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .14);
}
</style>
<div class="buyPacketBlock">
	<form method="post">
		<input type="hidden" name="packageId" value="<?php echo $params['package']['id'];?>" />
		<h3><?php echo $params['package']['type'].' - '.$params['package']['name'];?></h3>
		<dl>
			<dd><?php echo nl2br($params['package']['info']);?></dd>
		</dl>
		<hr />
		<label><strong>ระยะเวลาที่ต้องการซื้อ</strong></label>
		<select name="priceId">
		
		<?php foreach ($params['package']['prices'] as $key => $value){
			$price = Helper::formatMoney($value['price']);
			echo <<<HTML
			<option value="{$value['id']}">{$value['month']} เดือน/ {$price} บาท</option>
HTML;
		}?>
		</select></p>
		<?php if($params['package']['type'] == 'colo'){?>
		<!--
		<h5>Optional</h5>
		<label>Net</label>
		<ul>
			<li><input type="radio" name="net" value="1" checked> Direct Like 100Mb - <?php echo InvoiceColo::PRICE_DIRECT_LINK_100M;?> บาท</li>
			<li><input type="radio" name="net" value="2"> Share Like 1Gb - <?php echo InvoiceColo::PRICE_SHARE_LINK_1G;?> บาท</li>
			<li><input type="radio" name="net" value="3"> Direct Like 1Gb - <?php echo InvoiceColo::PRICE_DIRECT_LINK_1G;?> บาท</li>
		</ul>
		<label>เพิ่ม ip</label>
		<input type="text" name="ipNum" value="0" /><br />
		<p><input type="checkbox" name="admin" /> ผู้ดูแลระบบ</p>
		-->
		<?php }?>
		
		<?php if($params['package']['type'] == 'hosting'){?>
		<!--
		<label>server name</label>
		<input type="text" name="serverName" /> *servername.p2dc.com
		-->
		<label>your domain</label>
		<input type="text" name="domain" />
		<?php }?>
		
		<?php if($params['package']['type'] == 'vps'){?>
		<label>OS ที่ต้องการ</label>
		<select name="os">
			<!--<option value="<?php echo InvoiceVPS::OS_UNIX;?>">UNIX</option>-->
			<option value="<?php echo InvoiceVPS::OS_LINUX;?>">LINUX</option>
			<option value="<?php echo InvoiceVPS::OS_WINDOW;?>">WINDOW</option>
		</select>
		<?php }?>
		<p><input type="submit" value="submit" class="btn" /></p>
	</form>
</div>
<script type="text/javascript">
$(function(){
	<?php if(!Authenticate::isLogin()){?>
	showLogin();
	//$('.modalLogin .close').hide();
	<?php }?>
});
</script>